home *** CD-ROM | disk | FTP | other *** search
- /*
- ** vputc.c
- **
- ** Pictor, Version 1.51, Copyright (c) 1992-94 SoftCircuits
- ** Redistributed by permission.
- */
-
- #include "pictor.h"
-
- /*
- ** Prints character to the current video position using the
- ** current color attribute.
- */
- void vputc(char c)
- {
- _asm mov di,_PL_offset
- _asm mov ax,_PL_segment
- _asm mov es,ax
- _asm mov ax,_PL_color
- _asm mov ah,al
- _asm mov al,c
- _asm cmp _PL_snowcheck,FALSE
- _asm je direct
- _asm mov bx,ax
- _asm mov dx,CGA_STATUS_PORT
- scan_lo:
- _asm in al,dx
- _asm shr al,1
- _asm jc scan_lo
- _asm cli
- scan_hi:
- _asm in al,dx
- _asm shr al,1
- _asm jnc scan_hi
- _asm xchg ax,bx
- _asm stosw
- _asm sti
- _asm jmp end_vputc
- direct:
- _asm stosw
- end_vputc:
- _asm mov _PL_offset,di
-
- } /* vputc */
-